﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

using System.Diagnostics;

namespace GameLibrary.Unit
{
    public static class UnitHelper
    {
        public static uint CostPerPoint = 100;


        
        private static List<UnitActionFlags> normalActionFlag
            = new List<UnitActionFlags>
            {
                UnitActionFlags.Attack,
                UnitActionFlags.Fortify,
                UnitActionFlags.Move
            };
        public static int NormalActionFlagCount
        {
            get { return normalActionFlag.Count; }
        }

        public static UnitActionFlags GetNormalActionFlag(int position)
        {
            CheckPositive(position, " Get Normal action flag.");
            return normalActionFlag[position];
        }
        [Conditional("DEBUG")]
        private static void CheckPositive(double value, string whereItFrom)
        {
            if (value < 0)
                throw new ArgumentOutOfRangeException(whereItFrom + " value should large than zero.");
        }

    }
}
